package com.moonlity.myspring;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class FirstBean {
    public static void main(String[] args) throws Exception {
//        配置核心spring文件所在位置
        ApplicationContext applicationContext = new ClassPathXmlApplicationContext("spring-idol.xml");
//        根据id获取到的接口
        ProjectJuggler performer = (ProjectJuggler) applicationContext.getBean("poeticDuke");
//        调用方法
        performer.perform();
    }
}
